@echo off

chcp 65001
cd /D "%~dp0"


@echo 配置pip仓库源
md %APPDATA%\pip
echo [global]>%APPDATA%\pip\pip.ini
echo timeout = 6000>>%APPDATA%\pip\pip.ini
echo index-url = https://pypi.tuna.tsinghua.edu.cn/simple>>%APPDATA%\pip\pip.ini
echo trusted-host = pypi.tuna.tsinghua.edu.cn>>%APPDATA%\pip\pip.ini


@echo 创建虚拟环境
python -m venv env


@echo 启动虚拟环境
call env\Scripts\activate.bat
pip list


@echo 安装库
python -m pip install --upgrade pip
pip install -r requirements.txt
pip list

pause
